<?php
    require('common.php');
    $db = new db_class('localhost','root','sewen744926','mackdown');
    $db->db_getconn();//连接数据库
    $db->db_settablename('cate');//连接数据表
    //查询范围
    $typearr=array('id','name','addtime');
    $rst=$db->db_select($typearr,'');
    $data=json_encode(($rst));
    exit($data);
    